class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: H = None
        self.z: B = None
        self.p: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: C = None
        self.z: G = None
        self.o: F = None
        self.t: G = None
        self.x: C = None
        self.s: G = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: H = None
        self.t: A = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: E = None
        self.y: A = None
        self.r: I = None
        self.x: D = None
        self.o: D = None
        self.z: H = None
        self.s: C = None
        self.t: H = None
        self.txt = txt

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

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

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

j = A("j")
l = B("l")
d = C("d")
k = D("k")
b = E("b")
a = F("a")
h = G("h")
e = H("e")
f = I("f")

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: C = None
        self.z: G = None
        self.o: F = None
        self.t: G = None
        self.x: C = None
        self.s: G = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: H = None
        self.t: A = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: E = None
        self.y: A = None
        self.r: I = None
        self.x: D = None
        self.o: D = None
        self.z: H = None
        self.s: C = None
        self.t: H = None
        self.txt = txt

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

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

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

j = A("j")
l = B("l")
d = C("d")
k = D("k")
b = E("b")
a = F("a")
h = G("h")
e = H("e")
f = I("f")

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