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

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: E = None
        self.p: G = None
        self.r: F = None
        self.txt = txt

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

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

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

g = A("g")
k = B("k")
c = C("c")
n = D("n")
e = E("e")
f = F("f")
d = G("d")
m = B("m")
a = F("a")
i = A("i")

g.t = c
g.u = c
g.s = c
g.w = a
g.r = i
g.y = i
k.o = m
k.w = c
k.s = d
c.r = f
c.q = f
n.o = d
n.p = d
n.x = e
n.r = a
e.v = a
e.t = k
e.x = k
f.u = i
f.o = a
d.v = m
d.s = f
m.o = k
m.w = c
m.s = d
a.u = i
a.o = f
i.t = c
i.u = c
i.s = c
i.w = a
i.r = g
i.y = g
assert c.r.o.u.w.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: F = None
        self.u: C = None
        self.r: A = None
        self.s: C = None
        self.y: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: E = None
        self.p: G = None
        self.r: F = None
        self.txt = txt

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

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

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

g = A("g")
k = B("k")
c = C("c")
n = D("n")
e = E("e")
f = F("f")
d = G("d")
m = B("m")
a = F("a")
i = A("i")

g.t = c
g.u = c
g.s = c
g.w = a
g.r = i
g.y = i
k.o = m
k.w = c
k.s = d
c.r = f
c.q = f
n.o = d
n.p = d
n.x = e
n.r = a
e.v = a
e.t = k
e.x = k
f.u = i
f.o = a
d.v = m
d.s = f
m.o = k
m.w = c
m.s = d
a.u = i
a.o = f
i.t = c
i.u = c
i.s = c
i.w = a
i.r = g
i.y = g
assert c.r.o.u.w.txt == "a"