class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: F = None
        self.v: J = None
        self.x: J = None
        self.r: G = None
        self.o: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.t: F = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: A = None
        self.p: D = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: E = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.t: F = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: A = None
        self.p: D = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: E = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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