class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: H = None
        self.q: A = None
        self.s: B = None
        self.p: B = None
        self.v: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: F = None
        self.y: G = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: C = None
        self.z: G = None
        self.s: C = None
        self.t: A = None
        self.v: A = None
        self.txt = txt

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

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

g = A("g")
h = B("h")
i = C("i")
j = D("j")
b = E("b")
n = F("n")
d = G("d")
e = H("e")
k = F("k")
l = A("l")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: F = None
        self.y: G = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: C = None
        self.z: G = None
        self.s: C = None
        self.t: A = None
        self.v: A = None
        self.txt = txt

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

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

g = A("g")
h = B("h")
i = C("i")
j = D("j")
b = E("b")
n = F("n")
d = G("d")
e = H("e")
k = F("k")
l = A("l")

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