class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: I = None
        self.y: D = None
        self.t: E = None
        self.r: G = None
        self.z: I = None
        self.u: E = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: I = None
        self.x: A = None
        self.u: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: C = None
        self.o: F = None
        self.y: F = None
        self.w: C = None
        self.z: G = None
        self.q: H = None
        self.p: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: A = None
        self.x: I = None
        self.p: G = None
        self.v: G = None
        self.z: G = None
        self.s: D = None
        self.t: B = None
        self.y: B = None
        self.txt = txt

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

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

m.p = f
m.w = h
m.z = h
m.y = d
m.q = d
m.t = c
m.u = c
m.r = l
b.s = l
b.w = h
b.x = m
b.u = f
k.w = c
k.o = m
k.y = m
k.r = m
k.t = f
k.s = b
d.t = m
d.v = c
d.y = h
c.u = f
c.o = f
c.y = f
c.r = k
c.w = k
c.z = l
c.q = a
c.p = m
f.x = h
f.s = h
f.t = m
f.p = m
f.o = c
f.z = k
f.u = a
f.y = a
f.r = l
l.q = f
a.u = d
a.s = d
a.r = m
a.x = h
a.p = l
a.v = l
a.z = l
a.t = b
a.y = b
h.y = d
assert c.u.p.p.p.y.v.z.txt == "
class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: I = None
        self.y: D = None
        self.t: E = None
        self.r: G = None
        self.z: I = None
        self.u: E = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: I = None
        self.x: A = None
        self.u: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: C = None
        self.o: F = None
        self.y: F = None
        self.w: C = None
        self.z: G = None
        self.q: H = None
        self.p: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: A = None
        self.x: I = None
        self.p: G = None
        self.v: G = None
        self.z: G = None
        self.s: D = None
        self.t: B = None
        self.y: B = None
        self.txt = txt

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

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

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