class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: C = None
        self.r: E = None
        self.z: D = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: D = None
        self.r: F = None
        self.y: E = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: B = None
        self.x: E = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: C = None
        self.x: C = None
        self.p: B = None
        self.t: F = None
        self.u: A = None
        self.q: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: D = None
        self.r: F = None
        self.y: E = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: B = None
        self.x: E = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: C = None
        self.x: C = None
        self.p: B = None
        self.t: F = None
        self.u: A = None
        self.q: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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