class A:
    def __init__(self, txt: str):
        self.r: G = 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.x: H = None
        self.o: G = None
        self.y: G = None
        self.q: E = None
        self.r: H = None
        self.t: F = None
        self.s: H = None
        self.u: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

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

l.r = b
n.o = d
g.x = m
g.r = m
g.s = m
g.o = b
g.y = b
g.q = c
g.t = j
g.u = d
d.r = c
d.u = m
d.w = b
d.p = f
d.s = l
c.p = j
c.u = f
j.p = i
b.v = l
b.q = l
b.w = l
b.r = g
b.x = g
b.z = m
m.v = b
m.r = i
m.p = n
m.q = f
m.z = g
m.w = d
f.r = c
f.u = m
f.w = b
f.p = d
f.s = l
i.p = j
i.u = f
assert c.u.s.r.txt == "
class A:
    def __init__(self, txt: str):
        self.r: G = 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.x: H = None
        self.o: G = None
        self.y: G = None
        self.q: E = None
        self.r: H = None
        self.t: F = None
        self.s: H = None
        self.u: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

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

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