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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: F = None
        self.u: I = None
        self.o: B = None
        self.p: I = None
        self.t: D = None
        self.v: I = None
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: B = None
        self.u: C = None
        self.p: H = None
        self.txt = txt

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

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

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

m.t = g
f.t = c
f.x = g
f.o = h
f.v = h
f.s = h
f.y = h
f.r = j
f.w = b
f.u = e
g.s = h
g.y = e
h.z = c
a.s = c
a.x = c
a.u = b
a.p = b
a.v = b
a.o = f
a.t = h
a.z = h
c.p = e
e.r = g
e.u = g
e.w = f
e.p = j
j.p = m
j.t = m
b.w = m
assert f.t.p.w.x.y.p.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: F = None
        self.u: I = None
        self.o: B = None
        self.p: I = None
        self.t: D = None
        self.v: I = None
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: B = None
        self.u: C = None
        self.p: H = None
        self.txt = txt

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

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

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

m.t = g
f.t = c
f.x = g
f.o = h
f.v = h
f.s = h
f.y = h
f.r = j
f.w = b
f.u = e
g.s = h
g.y = e
h.z = c
a.s = c
a.x = c
a.u = b
a.p = b
a.v = b
a.o = f
a.t = h
a.z = h
c.p = e
e.r = g
e.u = g
e.w = f
e.p = j
j.p = m
j.t = m
b.w = m
assert f.t.p.w.x.y.p.txt == "j"