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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: B = None
        self.o: A = None
        self.x: B = None
        self.s: B = None
        self.y: A = None
        self.u: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: E = None
        self.v: F = None
        self.u: B = None
        self.p: G = None
        self.w: C = None
        self.r: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: B = None
        self.o: A = None
        self.x: B = None
        self.s: B = None
        self.y: A = None
        self.u: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: E = None
        self.v: F = None
        self.u: B = None
        self.p: G = None
        self.w: C = None
        self.r: G = None
        self.txt = txt

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

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