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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: A = None
        self.w: F = None
        self.z: C = None
        self.q: A = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: B = None
        self.t: F = None
        self.z: E = None
        self.w: D = None
        self.p: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: A = None
        self.u: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: A = None
        self.w: F = None
        self.z: C = None
        self.q: A = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: B = None
        self.t: F = None
        self.z: E = None
        self.w: D = None
        self.p: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: A = None
        self.u: F = None
        self.txt = txt

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

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

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