class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: E = None
        self.s: D = None
        self.w: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = 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.p: H = None
        self.v: C = None
        self.o: I = None
        self.u: I = None
        self.txt = txt

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

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

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

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

g = A("g")
a = B("a")
i = C("i")
e = D("e")
l = E("l")
b = F("b")
j = G("j")
f = H("f")
d = I("d")
m = J("m")

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = 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.p: H = None
        self.v: C = None
        self.o: I = None
        self.u: I = None
        self.txt = txt

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

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

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

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

g = A("g")
a = B("a")
i = C("i")
e = D("e")
l = E("l")
b = F("b")
j = G("j")
f = H("f")
d = I("d")
m = J("m")

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