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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: F = None
        self.v: A = None
        self.o: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: F = None
        self.v: A = None
        self.o: F = None
        self.txt = txt

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

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

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