class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

f = A("f")
l = B("l")
g = C("g")
h = D("h")
b = E("b")
n = F("n")
j = F("j")

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

f = A("f")
l = B("l")
g = C("g")
h = D("h")
b = E("b")
n = F("n")
j = F("j")

f.w = j
f.x = g
l.v = f
l.q = g
g.v = f
h.y = l
b.u = f
b.o = g
b.t = g
b.q = l
b.p = j
n.v = g
n.q = g
n.o = f
n.y = f
n.x = h
n.p = b
j.v = g
j.q = g
j.o = f
j.y = f
j.x = h
j.p = b
assert n.p.u.x.v.x.txt == "g"