class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: G = None
        self.y: D = None
        self.s: B = None
        self.w: F = None
        self.o: D = None
        self.p: G = None
        self.z: D = None
        self.v: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: G = None
        self.z: B = None
        self.x: B = None
        self.p: D = None
        self.q: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: F = None
        self.o: G = None
        self.z: B = None
        self.x: F = None
        self.q: I = None
        self.v: C = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: G = None
        self.z: B = None
        self.x: B = None
        self.p: D = None
        self.q: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: F = None
        self.o: G = None
        self.z: B = None
        self.x: F = None
        self.q: I = None
        self.v: C = None
        self.r: D = None
        self.txt = txt

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

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

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