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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: A = None
        self.w: C = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: E = None
        self.q: A = None
        self.t: A = None
        self.y: E = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: F = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: F = None
        self.p: F = None
        self.s: G = None
        self.o: D = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: D = None
        self.p: D = None
        self.z: C = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: A = None
        self.v: F = None
        self.y: A = None
        self.txt = txt

b = A("b")
h = B("h")
l = C("l")
f = D("f")
e = E("e")
g = F("g")
m = G("m")
d = A("d")
j = A("j")

b.x = e
b.y = d
b.q = j
b.v = h
b.t = h
b.s = g
b.z = g
h.p = e
h.x = d
h.t = d
h.w = l
l.w = f
l.o = e
l.y = e
l.q = b
l.t = j
l.p = g
f.y = d
f.z = g
f.p = e
e.q = g
e.y = g
e.p = g
e.s = m
e.o = f
e.u = b
g.q = m
g.w = m
g.y = f
g.p = f
g.z = l
m.p = f
m.r = d
m.v = g
m.y = j
d.x = e
d.y = j
d.q = b
d.v = h
d.t = h
d.s = g
d.z = g
j.x = e
j.y = d
j.q = b
j.v = h
j.t = h
j.s = g
j.z = g
assert l.q.q.t.p.q.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: A = None
        self.q: A = None
        self.v: B = None
        self.s: F = None
        self.t: B = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: A = None
        self.w: C = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: E = None
        self.q: A = None
        self.t: A = None
        self.y: E = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: F = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: F = None
        self.p: F = None
        self.s: G = None
        self.o: D = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: D = None
        self.p: D = None
        self.z: C = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: A = None
        self.v: F = None
        self.y: A = None
        self.txt = txt

b = A("b")
h = B("h")
l = C("l")
f = D("f")
e = E("e")
g = F("g")
m = G("m")
d = A("d")
j = A("j")

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