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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: I = None
        self.t: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: G = None
        self.y: B = None
        self.p: D = None
        self.x: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: C = None
        self.o: C = None
        self.y: G = None
        self.t: B = None
        self.v: I = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: I = None
        self.t: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: G = None
        self.y: B = None
        self.p: D = None
        self.x: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: C = None
        self.o: C = None
        self.y: G = None
        self.t: B = None
        self.v: I = None
        self.txt = txt

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

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

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