class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: C = None
        self.p: C = None
        self.v: J = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: E = None
        self.z: I = None
        self.u: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: H = None
        self.p: B = None
        self.z: H = None
        self.y: G = None
        self.r: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: E = None
        self.z: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: E = None
        self.z: I = None
        self.u: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: H = None
        self.p: B = None
        self.z: H = None
        self.y: G = None
        self.r: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: E = None
        self.z: D = None
        self.txt = txt

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

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