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

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: B = None
        self.v: D = None
        self.t: F = None
        self.r: F = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: A = None
        self.u: A = None
        self.t: D = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: F = None
        self.t: C = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: B = None
        self.v: D = None
        self.t: F = None
        self.r: F = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: A = None
        self.u: A = None
        self.t: D = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: F = None
        self.t: C = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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