class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: E = None
        self.s: F = None
        self.p: F = None
        self.w: C = None
        self.z: E = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: D = None
        self.v: D = None
        self.q: F = None
        self.r: G = None
        self.x: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: G = None
        self.u: G = None
        self.p: F = None
        self.o: A = None
        self.x: C = None
        self.r: G = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: C = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: B = None
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: D = None
        self.v: D = None
        self.q: F = None
        self.r: G = None
        self.x: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: G = None
        self.u: G = None
        self.p: F = None
        self.o: A = None
        self.x: C = None
        self.r: G = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: C = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: B = None
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: D = None
        self.txt = txt

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

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