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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: C = None
        self.r: D = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: D = None
        self.y: A = None
        self.v: A = None
        self.o: D = None
        self.txt = txt

n = A("n")
b = B("b")
a = C("a")
c = D("c")
m = E("m")
k = F("k")
h = G("h")

n.t = h
n.y = h
n.r = k
n.w = k
n.o = a
n.v = a
n.s = c
b.w = a
b.y = a
b.o = a
b.q = h
a.w = b
c.t = m
c.r = m
c.u = k
c.y = b
m.v = c
m.z = a
m.t = a
m.q = b
m.o = n
m.u = n
m.w = k
k.v = h
k.p = a
k.q = a
k.r = c
h.w = a
h.q = c
h.o = c
h.y = n
h.v = n
assert k.r.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: F = None
        self.y: G = None
        self.w: F = None
        self.o: C = None
        self.s: D = None
        self.v: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: C = None
        self.r: D = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: D = None
        self.y: A = None
        self.v: A = None
        self.o: D = None
        self.txt = txt

n = A("n")
b = B("b")
a = C("a")
c = D("c")
m = E("m")
k = F("k")
h = G("h")

n.t = h
n.y = h
n.r = k
n.w = k
n.o = a
n.v = a
n.s = c
b.w = a
b.y = a
b.o = a
b.q = h
a.w = b
c.t = m
c.r = m
c.u = k
c.y = b
m.v = c
m.z = a
m.t = a
m.q = b
m.o = n
m.u = n
m.w = k
k.v = h
k.p = a
k.q = a
k.r = c
h.w = a
h.q = c
h.o = c
h.y = n
h.v = n
assert k.r.u.r.txt == "c"