class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: I = None
        self.o: C = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: F = None
        self.u: G = None
        self.y: A = None
        self.o: F = None
        self.z: F = None
        self.r: H = None
        self.t: H = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: B = None
        self.w: F = None
        self.s: E = None
        self.p: B = None
        self.u: F = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.q: J = None
        self.t: B = None
        self.s: G = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: E = None
        self.q: I = None
        self.p: E = None
        self.u: E = None
        self.s: H = None
        self.w: F = None
        self.x: F = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: F = None
        self.u: G = None
        self.y: A = None
        self.o: F = None
        self.z: F = None
        self.r: H = None
        self.t: H = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: B = None
        self.w: F = None
        self.s: E = None
        self.p: B = None
        self.u: F = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.q: J = None
        self.t: B = None
        self.s: G = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: E = None
        self.q: I = None
        self.p: E = None
        self.u: E = None
        self.s: H = None
        self.w: F = None
        self.x: F = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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