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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: D = None
        self.y: E = None
        self.o: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: B = None
        self.r: D = None
        self.w: B = None
        self.txt = txt

b = A("b")
h = B("h")
g = C("g")
j = D("j")
k = E("k")
f = F("f")
m = C("m")
a = E("a")

b.v = k
b.t = m
b.q = g
b.p = j
b.r = j
h.w = a
g.p = h
g.o = h
g.t = j
g.y = a
j.r = m
j.w = f
k.y = b
k.t = f
f.t = h
f.p = h
f.w = h
f.r = j
m.p = h
m.o = h
m.t = j
m.y = a
a.y = b
a.t = f
assert g.o.w.y.t.y.t.r.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: C = None
        self.q: C = None
        self.p: D = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: D = None
        self.y: E = None
        self.o: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: B = None
        self.r: D = None
        self.w: B = None
        self.txt = txt

b = A("b")
h = B("h")
g = C("g")
j = D("j")
k = E("k")
f = F("f")
m = C("m")
a = E("a")

b.v = k
b.t = m
b.q = g
b.p = j
b.r = j
h.w = a
g.p = h
g.o = h
g.t = j
g.y = a
j.r = m
j.w = f
k.y = b
k.t = f
f.t = h
f.p = h
f.w = h
f.r = j
m.p = h
m.o = h
m.t = j
m.y = a
a.y = b
a.t = f
assert g.o.w.y.t.y.t.r.txt == "j"