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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: D = None
        self.o: E = None
        self.s: F = None
        self.u: D = None
        self.w: F = None
        self.x: J = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: F = None
        self.w: A = None
        self.x: C = None
        self.q: H = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: G = None
        self.r: F = None
        self.s: C = None
        self.o: D = None
        self.p: F = None
        self.z: C = None
        self.w: D = None
        self.v: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: D = None
        self.o: E = None
        self.s: F = None
        self.u: D = None
        self.w: F = None
        self.x: J = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: F = None
        self.w: A = None
        self.x: C = None
        self.q: H = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: G = None
        self.r: F = None
        self.s: C = None
        self.o: D = None
        self.p: F = None
        self.z: C = None
        self.w: D = None
        self.v: H = None
        self.txt = txt

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

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