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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: G = None
        self.q: A = None
        self.u: D = None
        self.s: A = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: A = None
        self.q: D = None
        self.w: A = None
        self.r: A = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: G = None
        self.q: A = None
        self.u: D = None
        self.s: A = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: A = None
        self.q: D = None
        self.w: A = None
        self.r: A = None
        self.z: D = None
        self.txt = txt

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

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