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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: J = None
        self.y: C = None
        self.r: H = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: B = None
        self.v: F = None
        self.p: H = None
        self.x: A = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: D = None
        self.r: B = None
        self.u: F = None
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: B = None
        self.w: E = None
        self.p: J = None
        self.t: H = None
        self.x: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: E = None
        self.r: E = None
        self.x: C = None
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: D = None
        self.q: C = None
        self.s: E = None
        self.r: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: E = None
        self.p: A = None
        self.w: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: J = None
        self.y: C = None
        self.r: H = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: B = None
        self.v: F = None
        self.p: H = None
        self.x: A = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: D = None
        self.r: B = None
        self.u: F = None
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: B = None
        self.w: E = None
        self.p: J = None
        self.t: H = None
        self.x: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: E = None
        self.r: E = None
        self.x: C = None
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: D = None
        self.q: C = None
        self.s: E = None
        self.r: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: E = None
        self.p: A = None
        self.w: E = None
        self.txt = txt

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

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