class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: B = None
        self.v: E = None
        self.r: G = None
        self.s: C = None
        self.o: G = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: C = None
        self.r: C = None
        self.t: H = None
        self.s: D = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: A = None
        self.q: G = None
        self.txt = txt

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

f.u = c
b.o = i
l.y = f
l.q = n
l.s = n
l.r = i
l.z = m
l.t = d
l.p = d
l.x = c
c.v = m
c.x = m
c.p = f
c.w = d
c.q = d
c.t = i
i.p = l
i.y = l
i.o = l
i.t = l
i.u = n
i.q = f
g.t = b
g.y = b
g.v = i
g.r = m
g.o = m
g.s = l
g.w = c
m.z = f
m.o = f
m.y = l
m.r = l
m.t = d
m.s = c
d.x = g
d.p = f
d.q = n
n.z = f
n.o = f
n.y = l
n.r = l
n.t = d
n.s = c
assert c.p.u.t.u.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: B = None
        self.v: E = None
        self.r: G = None
        self.s: C = None
        self.o: G = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: C = None
        self.r: C = None
        self.t: H = None
        self.s: D = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: A = None
        self.q: G = None
        self.txt = txt

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

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