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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: F = None
        self.q: E = None
        self.y: F = None
        self.u: A = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: A = None
        self.u: E = None
        self.s: D = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: D = None
        self.y: A = None
        self.x: C = None
        self.t: B = None
        self.txt = txt

e = A("e")
n = B("n")
c = C("c")
g = D("g")
h = E("h")
k = F("k")
b = A("b")
j = C("j")

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: F = None
        self.q: E = None
        self.y: F = None
        self.u: A = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: A = None
        self.u: E = None
        self.s: D = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: D = None
        self.y: A = None
        self.x: C = None
        self.t: B = None
        self.txt = txt

e = A("e")
n = B("n")
c = C("c")
g = D("g")
h = E("h")
k = F("k")
b = A("b")
j = C("j")

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