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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: J = None
        self.w: E = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: J = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: A = None
        self.u: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: J = None
        self.w: E = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: J = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: A = None
        self.u: G = None
        self.txt = txt

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

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