class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: B = None
        self.o: A = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: A = None
        self.o: D = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: B = None
        self.z: F = None
        self.p: A = None
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: C = None
        self.q: F = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

c.q = b
l.y = b
l.p = j
l.o = c
l.s = a
m.t = i
m.y = c
m.o = a
m.p = d
a.u = j
a.x = l
a.z = i
a.p = c
a.t = c
b.o = m
i.w = l
i.y = j
k.p = f
k.u = m
k.q = i
k.y = a
d.p = a
f.p = k
f.u = m
f.q = i
f.y = a
j.y = b
j.p = l
j.o = c
j.s = a
assert f.u.p.p.t.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: B = None
        self.o: A = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: A = None
        self.o: D = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: B = None
        self.z: F = None
        self.p: A = None
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: C = None
        self.q: F = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

c.q = b
l.y = b
l.p = j
l.o = c
l.s = a
m.t = i
m.y = c
m.o = a
m.p = d
a.u = j
a.x = l
a.z = i
a.p = c
a.t = c
b.o = m
i.w = l
i.y = j
k.p = f
k.u = m
k.q = i
k.y = a
d.p = a
f.p = k
f.u = m
f.q = i
f.y = a
j.y = b
j.p = l
j.o = c
j.s = a
assert f.u.p.p.t.txt == "c"