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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: A = None
        self.p: G = None
        self.o: G = None
        self.r: G = None
        self.v: G = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: D = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: E = None
        self.p: C = None
        self.x: E = None
        self.w: D = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: A = None
        self.q: D = None
        self.w: A = None
        self.u: D = None
        self.p: C = None
        self.txt = txt

a = A("a")
b = B("b")
k = C("k")
g = D("g")
n = E("n")
e = F("e")
l = G("l")
f = E("f")
j = F("j")
d = B("d")

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: A = None
        self.p: G = None
        self.o: G = None
        self.r: G = None
        self.v: G = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: D = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: E = None
        self.p: C = None
        self.x: E = None
        self.w: D = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: A = None
        self.q: D = None
        self.w: A = None
        self.u: D = None
        self.p: C = None
        self.txt = txt

a = A("a")
b = B("b")
k = C("k")
g = D("g")
n = E("n")
e = F("e")
l = G("l")
f = E("f")
j = F("j")
d = B("d")

a.w = l
b.z = f
b.u = a
b.w = a
b.y = j
b.t = j
b.v = n
b.q = g
k.z = g
k.w = g
k.p = j
k.v = j
k.r = f
k.t = b
g.t = d
g.q = a
g.p = l
g.o = l
g.r = l
g.v = l
g.u = b
n.x = j
n.v = g
n.w = a
e.y = g
e.w = g
e.u = n
e.x = n
e.p = k
e.r = a
l.v = g
l.q = g
l.u = g
l.s = a
l.w = a
l.p = k
f.x = j
f.v = g
f.w = a
j.y = g
j.w = g
j.u = f
j.p = k
j.x = n
j.r = a
d.z = n
d.v = n
d.u = a
d.w = a
d.y = j
d.t = j
d.q = g
assert e.r.w.p.p.p.txt == "k"