class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: A = None
        self.z: B = None
        self.v: F = None
        self.t: E = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: E = None
        self.x: B = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: B = None
        self.v: A = None
        self.x: C = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: C = None
        self.q: E = None
        self.s: D = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: A = None
        self.u: F = None
        self.w: A = None
        self.o: B = None
        self.txt = txt

j = A("j")
m = B("m")
f = C("f")
b = D("b")
h = E("h")
n = F("n")
i = G("i")
a = B("a")
k = B("k")

j.t = i
m.u = b
m.y = j
m.z = k
m.v = n
m.t = h
m.w = f
f.t = j
f.w = b
b.r = h
b.o = h
b.x = a
b.t = m
h.o = b
h.t = k
h.v = j
h.x = f
h.r = m
n.y = f
n.r = f
n.q = h
n.o = h
n.s = b
i.t = n
i.u = n
i.v = j
i.w = j
i.o = a
a.u = b
a.y = j
a.z = m
a.v = n
a.t = h
a.w = f
k.u = b
k.y = j
k.z = a
k.v = n
k.t = h
k.w = f
assert j.t.o.w.w.r.v.txt == "
class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: A = None
        self.z: B = None
        self.v: F = None
        self.t: E = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: E = None
        self.x: B = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: B = None
        self.v: A = None
        self.x: C = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: C = None
        self.q: E = None
        self.s: D = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: A = None
        self.u: F = None
        self.w: A = None
        self.o: B = None
        self.txt = txt

j = A("j")
m = B("m")
f = C("f")
b = D("b")
h = E("h")
n = F("n")
i = G("i")
a = B("a")
k = B("k")

j.t = i
m.u = b
m.y = j
m.z = k
m.v = n
m.t = h
m.w = f
f.t = j
f.w = b
b.r = h
b.o = h
b.x = a
b.t = m
h.o = b
h.t = k
h.v = j
h.x = f
h.r = m
n.y = f
n.r = f
n.q = h
n.o = h
n.s = b
i.t = n
i.u = n
i.v = j
i.w = j
i.o = a
a.u = b
a.y = j
a.z = m
a.v = n
a.t = h
a.w = f
k.u = b
k.y = j
k.z = a
k.v = n
k.t = h
k.w = f
assert j.t.o.w.w.r.v.txt == "j"