class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: B = None
        self.y: I = None
        self.r: G = None
        self.v: G = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: A = None
        self.w: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: E = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: E = None
        self.s: C = None
        self.t: E = None
        self.y: A = None
        self.q: H = None
        self.o: A = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: G = None
        self.s: E = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: A = None
        self.w: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: E = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: E = None
        self.s: C = None
        self.t: E = None
        self.y: A = None
        self.q: H = None
        self.o: A = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: G = None
        self.s: E = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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