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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: H = None
        self.t: B = None
        self.v: B = None
        self.q: H = None
        self.o: A = None
        self.u: B = None
        self.r: D = None
        self.s: J = None
        self.z: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: B = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: H = None
        self.t: B = None
        self.v: B = None
        self.q: H = None
        self.o: A = None
        self.u: B = None
        self.r: D = None
        self.s: J = None
        self.z: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: B = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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