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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.z: I = None
        self.w: G = None
        self.t: I = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: H = None
        self.y: C = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: C = None
        self.t: A = None
        self.o: I = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

d = A("d")
h = B("h")
l = C("l")
a = D("a")
c = E("c")
n = F("n")
j = G("j")
k = H("k")
m = I("m")
g = D("g")

d.t = n
d.w = a
d.z = a
d.u = j
d.y = j
d.x = g
d.p = h
d.q = k
h.v = l
l.q = g
l.p = n
l.z = c
l.s = j
a.x = l
a.u = k
a.s = n
a.r = n
a.y = c
a.p = g
a.q = j
a.o = d
c.p = m
c.z = m
c.t = m
c.w = j
c.u = k
n.z = h
n.o = k
n.y = l
n.p = d
j.v = h
j.y = l
j.t = d
j.o = m
j.z = k
k.o = n
m.p = h
m.s = g
m.x = k
m.o = j
m.r = c
m.u = d
g.x = l
g.u = k
g.s = n
g.r = n
g.y = c
g.p = a
g.q = j
g.o = d
assert l.q.x.p.z.v.txt == "
class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: D = None
        self.u: G = None
        self.x: D = None
        self.p: B = None
        self.q: H = None
        self.z: D = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.z: I = None
        self.w: G = None
        self.t: I = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: H = None
        self.y: C = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: C = None
        self.t: A = None
        self.o: I = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

d = A("d")
h = B("h")
l = C("l")
a = D("a")
c = E("c")
n = F("n")
j = G("j")
k = H("k")
m = I("m")
g = D("g")

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