class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: F = None
        self.s: B = None
        self.t: B = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: H = None
        self.v: E = None
        self.w: C = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: E = None
        self.v: C = None
        self.y: B = None
        self.x: B = None
        self.q: A = None
        self.r: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: H = None
        self.v: E = None
        self.w: C = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: E = None
        self.v: C = None
        self.y: B = None
        self.x: B = None
        self.q: A = None
        self.r: H = None
        self.txt = txt

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

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