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

class B:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: F = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: D = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: C = None
        self.w: F = None
        self.u: F = None
        self.z: C = None
        self.s: E = None
        self.txt = txt

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

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

b = A("b")
j = B("j")
n = C("n")
d = D("d")
e = E("e")
k = F("k")
l = B("l")
f = C("f")

b.v = e
b.x = n
b.t = f
j.r = l
j.z = k
j.x = k
n.r = e
n.t = d
n.v = j
d.r = n
d.y = f
d.z = f
d.w = k
d.u = k
d.s = e
e.o = d
e.v = d
e.r = k
k.w = d
k.q = b
l.r = j
l.z = k
l.x = k
f.r = e
f.t = d
f.v = l
assert j.r.x.w.r.t.y.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: C = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: F = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: D = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: C = None
        self.w: F = None
        self.u: F = None
        self.z: C = None
        self.s: E = None
        self.txt = txt

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

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

b = A("b")
j = B("j")
n = C("n")
d = D("d")
e = E("e")
k = F("k")
l = B("l")
f = C("f")

b.v = e
b.x = n
b.t = f
j.r = l
j.z = k
j.x = k
n.r = e
n.t = d
n.v = j
d.r = n
d.y = f
d.z = f
d.w = k
d.u = k
d.s = e
e.o = d
e.v = d
e.r = k
k.w = d
k.q = b
l.r = j
l.z = k
l.x = k
f.r = e
f.t = d
f.v = l
assert j.r.x.w.r.t.y.txt == "f"